package com.yuelan.apartment.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yuelan.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @description:
 * @Author: ZhaoYi
 * @date: 24-6-21 22:43
 */
@ApiModel("租金订单")
@Data
public class RentOrder extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("房源id")
    @NotNull(message = "房源不能为空")
    private Long apartmentId;

    @ApiModelProperty("房间id")
    @NotNull(message = "房间不能为空")
    private String roomId;

    @ApiModelProperty("租户id")
    @NotNull(message = "租户不能为空")
    private Long tenantId;

    @ApiModelProperty("每次收租时间")
    @NotNull(message = "租金收取时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date collectionTime;

    @ApiModelProperty("租金金额")
    @NotNull(message = "金额不能为空")
    private Double amount;

    /**
     * Day日付、Week周付、Month月付、Quarter季付、Year年付
     */
    @ApiModelProperty("支付类型")
    @NotNull(message = "支付类型不能为空")
    private String paymentType;

    /**
     * 参数类型：'Collected','Uncollected','Overdue'
     */
    @ApiModelProperty("订单状态（已收、未收、逾期）")
    @NotNull(message = "订单状态不能为空")
    private String status;

    @ApiModelProperty("订单生成时间")
    @NotNull(message = "订单生成时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
